<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .contain{
        width: 100%;
        height: 500px;
        border: 1px solid black;
        margin: 100px;
        position: relative;
    }
    
    img{
        position: relative;
        top: 10px;
        left: 200px;
    }

    .div1{
        width: 100px;
        height: 100px;
        background-color: blue;
        position: absolute;
        top: 90px;
        left: 0px;
    }

    .div2{
        width: 100px;
        height: 100px;
        background-color: red;
        position: fixed;
        bottom: 90px;
        right: -19px;
    }
    </style>
</head>
<body>
    <div class="contain">
     <img src="../u=3381573685,1866477444&fm=26&gp=0.jpg" alt="">
     <div class="div1"></div>
     <div class="div2">
         返回顶部
     </div>
    </div>
</body>
</html>